//c++primer 书一章最后，书店书有相同序号的就相加保存输出，不是相同序号的直接输出
#include <iostream>
#include "Sales_item.h"
int main()
{
    Sales_item total,trans;
    if(std::cin >> total){
    	while(std::cin >> trans){
	    if(total.same_isbn(trans)) {
		    total = total + trans;
		    std::cout << "已相加:"<<total << "请继续输入：" << std::endl;
	    }else{
	        std::cout << total << std::endl;
		total = trans;
	    }
	}
	 return 0 ;
    }else{
         std::cout << "未输入数据" << std::endl;
         return -1;
    }

}
